Not applicable.
Not applicable.
1. Field of the Invention
The present invention generally relates to arbitration on a digital bus. More particularly, the invention relates to an improved arbitration on an IEEE 1394 bus. More particularly still, the invention relates to an improved dual phase arbitration scheme on an IEEE 1394 bus.
2. Background of the Invention
A xe2x80x9cbusxe2x80x9d is a collection of signals interconnecting two or more electrical devices that permits one device to transmit information to one or more other devices. There are many different types of busses used in computers and computer-related products. Examples include the Peripheral Component Interconnect (xe2x80x9cPCIxe2x80x9d) bus, the Industry Standard Architecture (xe2x80x9cISAxe2x80x9d) bus and Universal Serial Bus (xe2x80x9cUSBxe2x80x9d), to name a few. The operation of a bus usually defined by a standard which specifies various concerns such as the electrical characteristics of the bus, how data is to be transmitted over the bus, how requests for data are acknowledged, and the like. Using a bus to perform an activity, such as transmitting data, requesting data, etc., is generally called running a xe2x80x9ccycle.xe2x80x9d Standardizing a bus protocol helps to ensure effective communication between devices connected to the bus, even if such devices are made by different manufacturers. Any company wishing to make and sell a device to be used on a particular bus, provides that device with an interface unique to the bus to which the device will connect. Designing a device to particular bus standard ensures that device will be able to communicate properly with all other devices connected to the same bus, even if such other devices are made by different manufacturers. Thus, for example, an internal fax/modem (ie., internal to a personal computer) designed for operation on a PCI bus will be able to transmit and receive data to and from other devices on the PCI bus, even if each device on the PCI bus is made by a different manufacturer.
According to most bus protocols, a device that needs to run a cycle on the bus must first gain control of the bus. Once the sending device has control of the bus, that device then can run its desired cycle, which may entail transmitting data to a receiving bus device. Often, more than one bus device may concurrently need to initiate a cycle on the bus. Bus protocols in which multiple devices may request control of the bus to run cycles usually implement some form of xe2x80x9carbitrationxe2x80x9d to efficiently decide which device to grant control of the bus among multiple devices requesting control. The prior art is replete with many types of arbitration schemes.
Currently, there is a market push to incorporate various types of consumer electronic equipment with a bus interface that permits such equipment to be connected to other equipment with a corresponding bus interface. For example, digital cameras, digital video recorders, digital video disks (xe2x80x9cDVDsxe2x80x9d), printers are becoming available with an IEEE 1394 bus interface. The IEEE (xe2x80x9cInstitute of Electrical and Electronics Engineersxe2x80x9d) 1394 bus, for example, permits a digital camera to be connected to a printer or computer so that an image acquired by the camera can be printed on the printer or stored electronically in the computer. Further, digital televisions can be coupled to a computer or computer network via an IEEE 1394 bus.
The present invention provides an improvement to arbitration on the IEEE 1394 bus, although the principles of the present invention may extend to other bus protocols, certainly other bus protocols experiencing a similar arbitration problem to that described below. To understand the nature of the problem solved by the present invention, the general structure and operation of an IEEE 1394 bus and arbitration scheme will now be provided. Referring to FIG. 1, an IEEE 1394 network 50 comprises one or more xe2x80x9cnodes,xe2x80x9d node 1-node 7. A node represents an electronic device(s) with an IEEE 1394 bus interface. A node device may comprise a computer, a digital camera, a digital video recorder, a DVD player, or another type of device having a suitable bus interface. Each node couples to at least one other node. As shown in the exemplary architecture of FIG. 1, node 1 couples both to nodes 2 and 3. Node 3, in turn, couples to nodes 4, and 5 and node 5 also couples to nodes 6 and 7. In general, each node can transmit data to any other node in the network. For example, node 7 can transmit data to node 2, but the transmitted data will pass from node 7 to node 5 to node 3 to node 1 and then, to node 2.
The IEEE 1394 standard has undergone modification from the initial release of the bus standard referred to as xe2x80x9cIEEE 1395-1995xe2x80x9d to the current approved standard called xe2x80x9cIEEE 1394a.xe2x80x9d The changes from IEEE 1395-1995 to IEEE 1394a are beyond the scope of relevance of the present invention and thus are not discussed in this disclosure. Currently, modification of the IEEE 1394a standard to a new version known as IEEE 1494b is underway. The proposed IEEE 1394b protocol includes a rework of the way in which arbitration works on the bus. The proposed IEEE 1394b arbitration will now be described with continued reference to FIG. 1.
In accordance with the IEEE 1394b standard, one of the nodes is selected to be the Bus Owner/Supervisor/Selector (xe2x80x9cBOSSxe2x80x9d). For a node to be a BOSS node means that node has control over the bus. For a node to transmit its data to another node or send a data request to another node, the sending node must become the BOSS. Thus, any node in the network can potentially become the BOSS and, in fact, must become the BOSS to transmit data or send a request for data to another node. Under normal operation, there is always a node that is the BOSS at any given time. One of the tasks that a BOSS node performs is to select another node to act as the next BOSS. Thus, in contrast to various other types of busses that have fixed logic that makes the arbitration decisions, each current BOSS node makes the arbitration decision, then grants ownership of the bus to the new BOSS node.
The IEEE 1394b proposal uses a xe2x80x9cdual phasexe2x80x9d pipelined arbitration scheme. In this arbitration scheme, there are two phases: an xe2x80x9coddxe2x80x9d phase and an xe2x80x9cevenxe2x80x9d phase. The bus is in either the odd phase or the even phase at any one point in time. Arbitration decisions are made based on the current state of the bus and the types of arbitration requests being received by the BOSS node. Each node is aware of the current phase of the bus and issues requests to be the BOSS based on the current phase. Once all of the current requests related to the current phase have been granted and completed, the bus phase switched to the opposite phase. Switching the phase of the bus is accomplished by the BOSS issuing an arbitration reset message.
The types of requests that the nodes can issue, in order of arbitration priority from highest priority to lowest priority, include:
1. Cycle_start_req_a request to be BOSS so that the period and cycle start packet can be sent
2. Border_High_a request to be BOSS so that the gap timing of an attached 1394a bus can be preserved
3. Next_odd_a request to be a BOSS when the bus, currently in the even phase, switches to the odd phase; if the bus is currently in the odd phase, then the priority level of Next_odd becomes 5 and the level of Next_even becomes 3
4. Current_request to be a BOSS in the current phase of the bus
5. Next_even_a request to be a BOSS when the bus, currently in the odd phase, switches to the even phase
6. Border_Low_used to keep the beta side of a border node from advancing to a new fairness cycle
Thus, for example, a request from a node that issues a Cycle start req is given higher priority than a node that issues a Next_odd request.
With the arbitration scheme proposed above for the IEEE 1394b bus protocol, a xe2x80x9cracexe2x80x9d condition can occur that can degrade the performance of the bus. The following example, which focuses on nodes 1, 2, and 7, will illustrate this problem. Assuming node 1 is the current BOSS, nodes 2 and 7, as well as any other node, may request control of the bus. As is obvious from FIG. 1, node 2 is close to node 1 (the BOSS) in the sense that there are no intervening nodes between nodes 1 and 2. Node 7, on the other hand, is farther from node 1 as there are two nodes, nodes 3 and 5, through which communications must flow between nodes 1 and 7. Assume further that the bus is currently in the odd phase and that node 2 and node 7 request control of the bus when it switches to the even phase (by issuing Next_even requests).
Because the Next_even request from node 2 will reach the BOSS node (node 1) before the Next_even request, node 1 may switch the bus to the even phase by issuing an Arbitration reset message to all nodes. At this point, the Next_even request from node 7 may still be working its way up the network to node 1, but it may not yet have reached node 1. With the bus reset to the even phase, node 1 may grant bus control to node 2 to be the next BOSS to permit node 2 to perform its desired cycle. Node 2, the new BOSS, will run its cycle and then arbitrate to determine which node will be the next BOSS. Node 2""s arbitration decision may be made while the original Next_even request from node 7 is still percolating up through nodes 5 and 3 of the network. In fact, node 2 may reset bus back to the odd phase and grant bus control back to node 1 while node 7""s Next_even request still has not been received by nodes 1 or 2. At this point, the bus has transitioned from the odd phase to the even phase and back to the odd phase, and node 7""s request for bus control of the bus in the even phase is out of synch with the operation of the bus.
One suggestion to solve this problem involves the use of a timer that prevents the BOSS from sending an arbitration reset message to switch the phase of the bus before the timer expires. The timer is set to expire in an amount of time at least equal to the maximum time it would take for an arbitration request message to be transmitted between the two most distant nodes in the network (e.g., nodes 2 and 7 in FIG. 1) and an acknowledgment to be returned. This timer-based solution is less than optimal because the maximum round trip time varies with the size of each network and either must be preset for all networks or must be customized for each network. Indeed, the problem is worse, since the optimal time is different for each node. Further, the bus is not able to reset itself to the opposite phase until a time period passes that may be longer than necessary for a given bus status, thereby diminishing the performance of the bus.
Thus, an improvement needs to be made to this arbitration scheme to avoid the race condition exemplified above. No such solution is known to exist today.
The problems noted above are solved in large part by a multiphase network of nodes that requires all nodes to broadcast their current understanding of the phase of the bus (e.g., odd or even). Even if a node is not requesting the bus, it must send a message that indicates which phase that node believes to be the current phase of the network. If a node that does not need the bus believes the bus currently is in the odd phase, then that node will transmit a xe2x80x9cNone_oddxe2x80x9d message indicating the node""s understanding that the bus is in the odd phase. Similarly, if a node that does not need the bus believes the bus currently is in the even phase, then that node will transmit a xe2x80x9cNone_evenxe2x80x9d message indicating the node""s understanding that the bus is in the even phase. Preferably, the current BOSS will not switch the phase of the bus, by issuing an arbitration reset message, until all nodes have a correct understanding of the current phase of the bus. This solution to the race condition problem identified above advantageously precludes the race condition from occurring while avoiding the use of timers and the problems associated with such timers noted above.
The arbitration priorities of the various messages on the bus preferably are set so that a xe2x80x9cNonexe2x80x9d message of the opposite phase has a higher priority than a xe2x80x9cNextxe2x80x9d request message of the opposite phase. Setting the arbitration priority levels in this way prevents the BOSS from considering all xe2x80x9cNextxe2x80x9d requests of the opposite phase until the BOSS insures that all nodes are aware of the current correct bus phase.